package com.arron.abstractfactory;

import com.arron.abstractfactory.Color.Blue;
import com.arron.abstractfactory.Color.Color;
import com.arron.abstractfactory.Color.Green;
import com.arron.abstractfactory.Color.Red;
import com.arron.abstractfactory.Shape.Shape;

public class ColorFactory extends AbstractFactory {
    @Override
    public Color getColor(String color) {
        if(color==null)
            return null;
        if(color.equalsIgnoreCase("RED"))
            return new Red();
        if(color.equalsIgnoreCase("GREEN"))
            return new Green();
        if(color.equalsIgnoreCase("BLUE"))
            return new Blue();
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        return null;
    }
}
